<?php

namespace common\models\linkedcare;

use Yii;

/**
 * This is the model class for table "{{%fy_linkedcare_user}}".
 *
 * @property int $id
 * @property string $ding_user_id 钉钉user_id
 * @property string|null $name 姓名
 * @property int|null $kq_user_id E看牙用户ID
 * @property int|null $kq_consult_id E看牙网电咨询师ID
 * @property int|null $kq_employee_no
 * @property string|null $kq_name_code
 * @property string|null $kq_mobile
 * @property int|null $kq_sex
 * @property string|null $kq_job
 * @property int|null $kq_department_id
 * @property string|null $kq_department
 * @property int|null $kq_office_id
 * @property int $status 状态【-1删除、0禁用、1启用】
 * @property string $create_at 创建时间
 * @property string $updated_at 更新时间
 */
class LinkedcareUser extends \common\models\base\BaseModel
{
    const STATUS_DELETE = -1;// 删除
    const STATUS_INVALID = 0;// 失效
    const STATUS_ENABLE = 1;// 正常

    public static $statuss = [
        self::STATUS_DELETE => '删除',
        self::STATUS_INVALID => '禁用',
        self::STATUS_ENABLE => '启用',
    ];

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%fy_linkedcare_user}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['kq_user_id', 'kq_consult_id', 'kq_employee_no', 'kq_sex', 'kq_department_id', 'kq_office_id', 'status'], 'integer'],
            [['create_at', 'updated_at'], 'safe'],
            [['ding_user_id'], 'string', 'max' => 64],
            [['name'], 'string', 'max' => 32],
            [['kq_name_code'], 'string', 'max' => 200],
            [['kq_mobile', 'kq_job', 'kq_department'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ding_user_id' => '钉钉user_id',
            'name' => '姓名',
            'kq_user_id' => 'E看牙用户ID',
            'kq_consult_id' => 'E看牙网电咨询师ID',
            'kq_employee_no' => 'Kq Employee No',
            'kq_name_code' => 'Kq Name Code',
            'kq_mobile' => 'Kq Mobile',
            'kq_sex' => 'Kq Sex',
            'kq_job' => 'Kq Job',
            'kq_department_id' => 'Kq Department ID',
            'kq_department' => 'Kq Department',
            'kq_office_id' => 'Kq Office ID',
            'status' => '状态【-1删除、0禁用、1启用】',
            'create_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
